package com.wj.algorithm.lintcode;

public class P2 {
    
    public long trailingZeros(long n) {
        long zeroCount = 0;
        
        do {
            zeroCount += (n = n / 5);
        }while(n > 5);
        
        return zeroCount;
    }
    
    public static void main(String[] args) {
        System.out.println(new P2().trailingZeros(Long.MAX_VALUE));
    }
}
